<%@page import="com.lzl.entity.Goods"%>
<%@page import="com.lzl.dao.Goodsdaoimpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("UTF-8");
String snack_number1=request.getParameter("snack_number");
String snack_name1=request.getParameter("snack_name");
String snack_price=request.getParameter("snack_price");
String snack_class1=request.getParameter("snack_class");
String snack_amount=request.getParameter("snack_amount");

float snack_price1=Float.parseFloat(snack_price);
int snack_amount1=Integer.parseInt(snack_amount);


Goodsdaoimpl gdimpl = new Goodsdaoimpl();
Goods g=new Goods(snack_number1,snack_name1,snack_price1,snack_amount1,snack_class1);
gdimpl.insert(g);
response.sendRedirect("goodctrl.jsp");
%>
</body>
</html>